﻿@using Telerik.Web.Mvc.UI
@using WebSite.Views
@using WebSite.ViewModels

@model WebSite.ViewModels.EditViewModels.EditViewModel

<h2>Editar @Model.Title</h2>

@if (Model.Message != null)
{
    <div style="color:Red">@Model.Message</div>
}
else
{
    using (Html.BeginForm("Edit", Model.ControllerName, FormMethod.Post, new { id = "editForm", name = "editForm" }))
    {
        Html.ValidationSummary(true);

        @Model.GetTabsViewModel(Html)
        <br />
        @(Html.Buttons()
            .Add(ButtonType.Insert, "#", "Salvar", "javascript:editForm.submit()")
            .Add(Model.Model, Model.ControllerName, ButtonType.Cancel))
    }
}